﻿<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>ReactiveUI property</Title>
      <Description>Inserts a ReactiveUI property</Description>
      <Shortcut>ruiprop</Shortcut>
      <SnippetTypes>
        <SnippetType>Expansion</SnippetType>
      </SnippetTypes>
    </Header>
    <Snippet>
      <Declarations>
        <Literal Editable="true">
          <ID>type</ID>
          <ToolTip>Type of field and property</ToolTip>
          <Default>string</Default>
        </Literal>
        <Literal Editable="true">
          <ID>fieldName</ID>
          <ToolTip>Name of backing field</ToolTip>
          <Default>myField</Default>
        </Literal>
        <Literal Editable="true">
          <ID>propertyName</ID>
          <ToolTip>Name of property</ToolTip>
          <Default>myProperty</Default>
        </Literal>
      </Declarations>
      <Code Language="csharp" Delimiter="$"><![CDATA[public $type$ $propertyName$ { get => $fieldName$; set => this.RaiseAndSetIfChanged(ref $fieldName$, value); }$end$]]>
			</Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>